<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script>
function showMsg()
{
alert("您已改变浏览器窗口的尺寸！");
}
</script>
</head>
<body onresize="showMsg()">
   
</body>
</html>